<?php
namespace common\sources\write\expiretimelog;

use common\models\craftsman\ExpireTimeLog;

class ExpireTimeLogAccess  implements IExpireTimeLogAccess
{
    public function addLog($data) {
        $log = new ExpireTimeLog();
        $log->buy_id = $data['buy_id'];
        $log->operator_id = $data['admin_id'];
        $log->operatorName = $data['operator_name'];
        $log->operatorPhone = $data['phone'];
        $log->expire_time_befor = $data['expire_time_befor'];
        $log->expire_time_now = $data['expire_time'];
        $log->description = $data['description'];
        $log->imgUrl = $data['imgUrl'];
        if ($log->save()) {
            return true;
        }
        return false;
    }
}